import { requests } from "../requests"

export const reqCode = (data) => {
    return requests({
        url: "/code/generate",
        method: 'get',
        params: data
    })
}

export const reqLogin = (data) => {
    return requests({
        url: '/user/login',
        method: 'post',
        data: data
    })
}

export const reqSendCode = (data) => {
    return requests({
        url: "/email/sendCode",
        method: 'get',
        params: data
    })
}

export const reqRegister = (data) => {
    return requests({
        url: "/user/register",
        method: 'post',
        data: data
    })
}

export const reqUserMeInfo = () => {
    return requests({
        url: "/user/info",
        method: 'get'
    })
}